[#include "/WEB-INF/pages/common/taglibs.ftl"]
<div class="jqxWidget">
	<div class="jqxExpander">
		<div>会员</div>	
		<div>
		    [@demo.tableDisplayer id="id" ajaxPage="true" renderTo="${renderTo}" property="userList" pagesize=4 page="/manage/User_list.action" name="FreemarkerTable" config="/WEB-INF/component/table/simple.ftl" bundle="messageSource"]
		    	[@demo.column name="batch" title="加入" innerHtml="\linput type='button' value='+' /\g" headerClass="addMember" columnClass="span1"/]
		    	[@demo.column name="id" property="id" title="ID" headerClass="span1" columnClass="span1"/]
		    	[@demo.column name="name" property="userName" title="账户" columnClass="span3"/]
		    	[@demo.column name="expireDay" property="expireDay" format="yyyy年MM月dd日" title="到期日" columnClass="span2"/]
		    	[@demo.column name="enabled" property="enabled" format="是:否" title="可用" columnClass="span1"/]
		    	[@demo.column name="locked" property="locked" format="是:否" title="锁定" columnClass="span1"/]
		    	[@demo.column name="isvalid" property="isValid" format="有效:无效" title="有效" columnClass="span1"/]
		    [/@demo.tableDisplayer]
		   	<a href="[@c.url value='/manage/Member_create.action' /]" >新建会员</a>
		</div>
	</div>
	<div class="jqxExpander">
		<div>会员</div>	
		[#list memberRoleList as memberRole]
		<div id="memberContent" class="member_content">
			<a href="${action.backurl}" >返回</a>
			<form action="[@c.url value="/manage/Member_${act}.action"/]?backurl=${action.backurl}" method="post">
				<input type="hidden" name="member.id" value="${(memberRole.memberId)!''}" />
				<input type="hidden" name="id" value="${id!''}" />
				<table>
					<caption>用户的数据内容</caption>
					<tr>
						<th>用户：[#--[@fmt.message key="manage.user"/] --]</th>
						<td><input type="text" readonly="readonly" name="user.userName" placeholder="请输入长度大于5位的用户名" value="${(memberRole.member.user.userName)!''}"/></td>
					</tr>
					<tr>
						<th>昵称：[#--[@fmt.message key="manage.article.type"/]--]</th>
						<td><input type="text" placeholder="用户昵称" name="member.nickName" value="${(memberRole.member.nickName)!''}"/></td>
					</tr>
					<tr>
						<th>姓名：[#--[@fmt.message key="manage.article.type"/]--]</th>
						<td><input type="text" readonly="readonly" placeholder="真实姓名" name="user.realName" value="${(memberRole.member.user.realName)!''}"/></td>
					</tr>
					<tr>
						<th>邮箱：[#--[@fmt.message key="manage.article.type"/]--]</th>
						<td><input type="text" readonly="readonly" placeholder="邮箱地址. 格式:xxx@xx.xx" name="user.email" value="${(memberRole.member.user.email)!''}"/></td>
					</tr>
					<tr>
						<th>性别：[#--[@fmt.message key="manage.article.type"/]--]</th>
						<td><select name="user.gender" readonly="readonly">
								<option value="">未知</option>
								<option value="M" [#if (memberRole.member.user.gender) ?? && memberRole.member.user.gender=='M']selected="selected"[/#if]>男</option>
								<option value="F" [#if (memberRole.member.user.gender) ?? && memberRole.member.user.gender=='F']selected="selected"[/#if]>女</option>
							</select>
						</td>
					</tr>
					<tr>
						<th>可用：</th>
						<td>
							<label>可用：</label><input type="checkbox" name="member.enabled" [#if memberRole.member.isEnabled()]checked="checked"[/#if] value="true"/>
							<label>锁定：</label><input type="checkbox" name="member.locked" [#if memberRole.member.isLocked()]checked="checked"[/#if] value="true" />
							<label>有效：</label><input type="checkbox" name="member.isValid" [#if memberRole.member.isValid]checked="checked"[/#if]  value="true"/>
						</td>
					</tr>
					<tr>
						<td colspan="2"> <hr/></td>
					</tr>
					<tr>
						<th>角色</th>
						<td>
							<ul>
							[#list roleList as role]
								<li><label>${role.title}</label>&nbsp;&nbsp;<input name="memberRoleList[${role_index}].roleId" type="hidden" value="${role.id}"/><input type="checkbox" name="memberRoleList[${role_index}].enabled" [#list memberRole.roleList as r][#if r.id==role.id]checked="checked"[/#if][/#list]/></li>
							[/#list]
							</ul>
						<td>
					</tr>
					<tr>
						<th></th>
						<td><input type="submit" value="提交"/></td>
					</tr>
				</table>
			</form> 
		</div>
		[/#list]
	</div>
</div>
<div id="delete-confirm" style="display:none" title="删除文章">
	<p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span>文章删除后将无法恢复.<br>您确认删除吗？</p>
</div>
